package d.n.d.domain;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the account database table.
 * 
 */
@Entity
@NamedQuery(name="Account.findAll", query="SELECT a FROM Account a")
public class Account implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String accountNumber;

	private String accountState;

	private String accountType;

	private double balance;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="idCardNumber")
	private Customer idCardNumber;

	//bi-directional many-to-one association to Transaction
	@OneToMany(mappedBy="sendAccount")
	private List<Transaction> transactionsSendAccount;

	//bi-directional many-to-one association to Transaction
	@OneToMany(mappedBy="receiveAccount")
	private List<Transaction> transactionsReceiveAccount;

	public Account() {
	}

	public String getAccountNumber() {
		return this.accountNumber;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	public String getAccountState() {
		return this.accountState;
	}

	public void setAccountState(String accountState) {
		this.accountState = accountState;
	}

	public String getAccountType() {
		return this.accountType;
	}

	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}

	public double getBalance() {
		return this.balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public Customer getIdCardNumber() {
		return this.idCardNumber;
	}

	public void setIdCardNumber(Customer idCardNumber) {
		this.idCardNumber = idCardNumber;
	}

}